﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.VisualStudio.TestTools.UnitTesting;

#endregion

namespace Weazel.NativeMath.Test
{
	[TestClass]
	public class TestNot
	{
		[TestMethod]
    public void TestNEG_1()
    {
      Integer a = new Integer(8, "0b00000000", false);
      Assert.AreEqual("11111111", (~a).ToBinaryString());
    }

    [TestMethod]
    public void TestNEG_2()
    {
      Integer a = new Integer(8, "0b11110000", false);
      Assert.AreEqual("00001111", (~a).ToBinaryString());
    }

    [TestMethod]
    public void TestNEG_3()
    {
      Integer a = new Integer(32, "0xFFFFFFFF", false);
      Assert.AreEqual("0", (~a).ToHexadecimalString());
    }

    [TestMethod]
    public void TestNegate_SingleBit()
    {
      Integer a = new Integer(1, "1", false);
      Assert.AreEqual("0", (~a).ToDecimalString());
    }
	}
}
